3.191 \(\int \frac{\cot (a+i \log (x))}{x^2} \, dx\)

Optimal. Leaf size=29 \[ 2 i e^{-i a} \tanh ^{-1}\left (e^{-i a} x\right )-\frac{i}{x} \]

[Out]

(-I)/x + ((2*I)*ArcTanh[x/E^(I*a)])/E^(I*a)

________________________________________________________________________________________

Rubi [F]  time = 0.0246961, antiderivative size = 0, normalized size of antiderivative = 0., number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0., Rules used = {} \[ \int \frac{\cot (a+i \log (x))}{x^2} \, dx \]

Verification is Not applicable to the result.

[In]

Int[Cot[a + I*Log[x]]/x^2,x]

[Out]

Defer[Int][Cot[a + I*Log[x]]/x^2, x]

Rubi steps

\begin{align*} \int \frac{\cot (a+i \log (x))}{x^2} \, dx &=\int \frac{\cot (a+i \log (x))}{x^2} \, dx\\ \end{align*}

Mathematica [A]  time = 0.0226852, size = 44, normalized size = 1.52 \[ 2 i \cos (a) \tanh ^{-1}(x \cos (a)-i x \sin (a))+2 \sin (a) \tanh ^{-1}(x \cos (a)-i x \sin (a))-\frac{i}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + I*Log[x]]/x^2,x]

[Out]

(-I)/x + (2*I)*ArcTanh[x*Cos[a] - I*x*Sin[a]]*Cos[a] + 2*ArcTanh[x*Cos[a] - I*x*Sin[a]]*Sin[a]

________________________________________________________________________________________

Maple [A]  time = 0.06, size = 47, normalized size = 1.6 \begin{align*}{\frac{-i}{x}}+i \left ({\frac{\ln \left ({{\rm e}^{ia}}+x \right ) }{{{\rm e}^{ia}}}}-{\frac{\ln \left ({{\rm e}^{ia}}-x \right ) }{{{\rm e}^{ia}}}} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a+I*ln(x))/x^2,x)

[Out]

-I/x+I*(1/exp(I*a)*ln(exp(I*a)+x)-1/exp(I*a)*ln(exp(I*a)-x))

________________________________________________________________________________________

Maxima [B]  time = 1.04772, size = 139, normalized size = 4.79 \begin{align*} \frac{x{\left (i \, \cos \left (a\right ) + \sin \left (a\right )\right )} \log \left (x^{2} + 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) + x{\left (-i \, \cos \left (a\right ) - \sin \left (a\right )\right )} \log \left (x^{2} - 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) -{\left ({\left (2 \, \cos \left (a\right ) - 2 i \, \sin \left (a\right )\right )} \arctan \left (\sin \left (a\right ), x + \cos \left (a\right )\right ) +{\left (2 \, \cos \left (a\right ) - 2 i \, \sin \left (a\right )\right )} \arctan \left (\sin \left (a\right ), x - \cos \left (a\right )\right )\right )} x - 2 i}{2 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x^2,x, algorithm="maxima")

[Out]

1/2*(x*(I*cos(a) + sin(a))*log(x^2 + 2*x*cos(a) + cos(a)^2 + sin(a)^2) + x*(-I*cos(a) - sin(a))*log(x^2 - 2*x*
cos(a) + cos(a)^2 + sin(a)^2) - ((2*cos(a) - 2*I*sin(a))*arctan2(sin(a), x + cos(a)) + (2*cos(a) - 2*I*sin(a))
*arctan2(sin(a), x - cos(a)))*x - 2*I)/x

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{i \, e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} + i}{x^{2} e^{\left (2 i \, a - 2 \, \log \left (x\right )\right )} - x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x^2,x, algorithm="fricas")

[Out]

integral((I*e^(2*I*a - 2*log(x)) + I)/(x^2*e^(2*I*a - 2*log(x)) - x^2), x)

________________________________________________________________________________________

Sympy [A]  time = 0.474434, size = 29, normalized size = 1. \begin{align*} - \left (i \log{\left (x - e^{i a} \right )} - i \log{\left (x + e^{i a} \right )}\right ) e^{- i a} - \frac{i}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*ln(x))/x**2,x)

[Out]

-(I*log(x - exp(I*a)) - I*log(x + exp(I*a)))*exp(-I*a) - I/x

________________________________________________________________________________________

Giac [B]  time = 1.26395, size = 54, normalized size = 1.86 \begin{align*} i \, e^{\left (-i \, a\right )} \log \left (i \, x + i \, e^{\left (i \, a\right )}\right ) - i \, e^{\left (-i \, a\right )} \log \left (-i \, x + i \, e^{\left (i \, a\right )}\right ) - \frac{i}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x^2,x, algorithm="giac")

[Out]

I*e^(-I*a)*log(I*x + I*e^(I*a)) - I*e^(-I*a)*log(-I*x + I*e^(I*a)) - I/x